const pool = require('../database/conn')

const searchUsername = async (str) => {
    const sql = 'SELECT users.id, users.name, users.avatar FROM `users` where name LIKE ?'

    const [rows] = await pool.query(sql, [str])
    return rows
}

module.exports = {
    searchUsername
}